<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
include 'config.php';
$ind = true;
?>
<html>
    <head>
        <title>Admin</title>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
        <style media="all" type="text/css">@import "css/all.css";</style>
    </head>
    <body>
        <div id="main">
            <?php include 'nav.php'; ?>
            <div id="middle">
                <div id="left-column">
                    <h3>Home</h3>
                    <ul class="nav">
                        <li class="last" ><a href="index">Statistics</a></li>
                    </ul>                   
                </div>

                <!--             Details starts-->
                <div id="center-column">
                    <div class="top-bar">
                        <h1>Welcome Admin,</h1>
                        <div class="breadcrumbs"><a href="index">Homepage</a></div>
                    </div>
                    <br /><hr/> 
                    <b>This screen will give you a quick overview of the system. </b><br/>
                    <h2>STATISTICS:</h2>
                    <div class="table"  >
                        <img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" />
                        <img src="img/bg-th-right.gif" width="7" height="7" alt="" class="right" />
                        <table class="listing" cellpadding="0" cellspacing="0">
                            <tr>
                                <th class="first" width="177">Statistics</th>

                                <th class="last" width="100" >Value</th>
                            </tr>
                            <?php
                            $total_earn = 0;
                            $q1 = mysql_query("select * from fa_user");
                            $qt = mysql_query("select * from salus_buy_product");
                            while ($row = mysql_fetch_array($qt)) {
                                $total_earn = $total_earn+ $row['product_prize'];
                            }
                            $q2 = mysql_query("select * from salus_company_list");
                            ?>
                            <tr class="bg" >
                                <td class="first style1">- Total Users(all products) </td>                               
                                <td class="last"><?= mysql_num_rows($q1) ?></td>
                            </tr>
                            <tr class="bg">
                                <td class="first style1">- Total Earns  </td>                               
                                <td class="last"> <?=$total_earn ?> &euro;</td>
                            </tr>
                            <tr>
                                <td class="first style1">- Total Companies </td>                               
                                <td class="last"><?=  mysql_num_rows($q2)?></td>
                            </tr>                            
                        </table>                        
                    </div>

                </div>
                <div id="right-column">
                    <strong class="h">INFO</strong>
                    <div class="box">Welcome to Adminpanel of SalusBaby.<br> This is home page of admin panel. And on each page this "INFO" will tell you what you can do with this page. </div>
                    <div id="google_translate_element"></div>
                </div>
            </div>
            <div id="footer"></div>
        </div>


    </body>
</html>
